#define _CRT_SECURE_NO_WARNINGS 1
#include"SearchBinaryTree.h"
using namespace std;
void Print(const BSTreeNode<int>* node)
{
	if (node == nullptr) return;
	Print(node->_left);
	cout << node->_key << " ";
	Print(node->_right);

}
int main()
{
	BSTree<int> tree;
	tree.insert(1);
	tree.insert(2);
	tree.insert(3);
	tree.insert(4);
	tree.insert(2);
	tree.insert(10);
	tree.insert(8);
	tree.insert(9);
	tree.insert(6);
	tree.erase(2);
	BSTreeNode<int>* root = tree.ROOT();
	Print(root);
	return 0;
}